#include <vector>
#include <list>
#include <iostream>
using std::list;
using std::vector;

template <class Iter1, class Iter2>
Iter2 my_copy(Iter1 f1, Iter1 e1, Iter2 f2)
{
    while (f1 != e1)
    {
        *f2++ = *f1++;
    }
    return f2;
}

int main()
{
    int arr[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    vector<int> arr_v{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    list<int> arr_l{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
    int arr1[10];
    for (int i = 0; i < 10; i++)
    {
        arr1[i] = arr[i];
    }
    for (int i = 0; i < 10; i++)
    {
        arr[i] += 2;
    }
    for (auto e : arr_v)
    {
        e += 3;
    }
    for (auto e : arr_l)
    {
        e += 5;
    }
    my_copy(arr, arr + 10, arr_l.begin());
    my_copy(arr_l.begin(), arr_l.end(), arr);
}